{{ '<?php' }}
{% for model in models %}
# {{ model.model_class }} Management
Route::group(array('prefix' => '{{ route_prefix }}/{{ model.model_name }}'), function()
{
    Route::get('/', array('as' => '{{ route_prefix }}.{{ model.model_name }}.index', 'uses' => '{{ namespace }}\Controller\{{ model.model_class }}Controller@getIndex'));
    Route::get('create', array('as' => '{{ route_prefix }}.{{ model.model_name }}.create', 'uses' => '{{ namespace }}\Controller\{{ model.model_class }}Controller@getCreate'));
    Route::post('create', '{{ namespace }}\Controller\{{ model.model_class }}Controller@postCreate');
    Route::get('{id}/show', array('as' => '{{ route_prefix }}.{{ model.model_name }}.show', 'uses' => '{{ namespace }}\Controller\{{ model.model_class }}Controller@getShow'));
    Route::get('{id}/edit', array('as' => '{{ route_prefix }}.{{ model.model_name }}.edit', 'uses' => '{{ namespace }}\Controller\{{ model.model_class }}Controller@getEdit'));
    Route::post('{id}/edit', '{{ namespace }}\Controller\{{ model.model_class }}Controller@postEdit');
    Route::get('{id}/delete', array('as' => '{{ route_prefix }}.{{ model.model_name }}.delete', 'uses' => '{{ namespace }}\Controller\{{ model.model_class }}Controller@getDelete'));
{% if model.softdelete %}
    Route::get('{id}/restore', array('as' => '{{ route_prefix }}.{{ model.model_name }}.restore', 'uses' => '{{ namespace }}\Controller\{{ model.model_class }}Controller@getRestore'));
{% endif %}
});
{% endfor %}